{extend name="base" /}
{block name="body"}

<div class="am-padding am-padding-bottom-0">
	<strong class="am-text-primary am-text-lg">栏目管理</strong> / <small>添加</small>
</div>

<div class="am-padding am-btn-toolbar">
	<div class="am-btn-group am-btn-group-xs">
		<a href="{:url('admin/Category/index')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 列表</a>
		<a href="{:url('admin/Category/add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
	</div>
</div>

<form class="am-form"  action="{:url('admin/Category/add')}" method="post">
	<fieldset>
		<div class="am-g">
			<div class="am-u-lg-6">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">所属模型</span>
						<select name="module_id" class="am-form-field">
							{foreach name="module_list" item="vo"}
							<option value="{$vo.id}">{$vo.title}</option>
							{/foreach}
						</select>
					</div>
				</div>
			</div>
			<div class="am-u-lg-6">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">上级栏目</span>
						<select name="pid" class="am-form-field">
							<option value="0">顶级栏目</option>
							{foreach name="category_list_tree" item="vo"}
							<option value="{$vo.id}">{$vo.title}</option>
							{/foreach}
						</select>
					</div>
				</div>
			</div>
		</div>
		<div class="am-g">
			<div class="am-u-lg-4">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">栏目名称</span>
						<input type="text" name="title" class="am-form-field" placeholder="请输入栏目名称">
					</div>
				</div>
			</div>
			<div class="am-u-lg-4">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">栏目目录</span>
						<input type="text" name="name" class="am-form-field" placeholder="请输入栏目目录">
					</div>
				</div>
			</div>
			<div class="am-u-lg-4">
				<div class="am-form-group am-form-file">
					<div class="am-input-group">
						<span class="am-input-group-label">栏目图标</span>			
						<input type="text" name="icon" class="am-form-field" placeholder="点击右侧上传图标，或直接输入地址" id="ipt-image">
						<div class="am-input-group-label am-form-input-image">
							<img src="/static/common/images/upload.png" alt="upload" class="am-img-thumbnail" id="view-image">
							<input type="file" class="ajax-upload-file" data-url="{:url('api/Upload/index')}" data-dir="image" data-allowext="jpg,gif,jpeg,png" data-ipt="#ipt-image" data-src="#view-image">
						</div>							
					</div>
				</div>
			</div>
		</div>
		
		<div class="am-g">
			<div class="am-u-lg-12">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">关键词</span>
						<input type="text" name="keywords" class="am-form-field" placeholder="请输入关键词">
					</div>
				</div>
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">描述</span>
						<textarea name="description" rows="5" placeholder="描述"></textarea>
					</div>
				</div>
			</div>
		</div>

		<div class="am-g">
			<div class="am-u-lg-4">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">类型</span>
						<div class="am-form-field">
							<label class="am-radio-inline">
								<input type="radio" name="type" value="0" data-am-ucheck checked> 频道
							</label>
							<label class="am-radio-inline">
								<input type="radio" name="type" value="1" data-am-ucheck> 列表
							</label>
						</div>
					</div>
				</div>
			</div>

	
			
			<div class="am-u-lg-4">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">列表模板</span>
						<select name="template_list" class="am-form-field">
							<option value="list_default.html">默认</option>
							{foreach name="template_list.list" item="vo"}
							<option value="{$vo}">{$vo}</option>
							{/foreach}
						</select>
					</div>
				</div>
			</div>
		
			
			<div class="am-u-lg-4">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">内容模板</span>
						<select name="template_show" class="am-form-field">
							<option value="show_default.html">默认</option>
							{foreach name="template_list.show" item="vo"}
							<option value="{$vo}">{$vo}</option>
							{/foreach}
						</select>
					</div>
				</div>
			</div>
		</div>

		<div class="am-g">
			<div class="am-u-lg-12">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">跳转地址</span>
						<input type="text" name="url" class="am-form-field" placeholder="请输入跳转链接">
					</div>
				</div>
			</div>
		</div>


		<div class="am-g">
			<div class="am-u-lg-6">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">排序</span>
						<input type="number" name="sort" class="am-form-field" placeholder="排序">
					</div>
				</div>
			</div>
			<div class="am-u-lg-6">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">状态</span>
						<div class="am-form-field">
							<label class="am-radio-inline">
								<input type="radio" name="status" value="1" data-am-ucheck checked> 正常
							</label>
							<label class="am-radio-inline">
								<input type="radio" name="status" value="0" data-am-ucheck> 禁用
							</label>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<p class="am-text-center"><button type="reset" class="am-btn am-btn-default">重置</button> <button type="submit" lay-submit lay-filter="submit" class="am-btn am-btn-default">保存</button></p>
			
	</fieldset>
</form>
         

{/block}



{block name="script"}

<script>
$(document).ready(function(){

});
</script>

{/block}

